package com.itheima.Demo;

import com.itheima.domain.User;
import com.itheima.mapper.UserMapper;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.List;

public class Test {
    public static void main(String[] args) {
        //4.获取代理对象
        ClassPathXmlApplicationContext cpx = new ClassPathXmlApplicationContext("spring.xml");
        UserMapper userMapper = cpx.getBean(UserMapper.class);
        List<User> all = userMapper.findAll();
        System.out.println(all);
    }
}
